package com.liruo.srpingframework.dataaccess.transaction.classlevel;

import com.liruo.srpingframework.dataaccess.transaction.TransactionEntityRepository;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Slf4j
@Service
public class TransactionClassLevelService extends TransactionClassLevelParent {
  @Resource
  TransactionEntityRepository repository;

  @Override
  public <T> void needOverrideMethod(T entity) {
    super.needOverrideMethod(entity);
  }

  @Override
  protected <T, ID> CrudRepository<T, ID> getRepository() {
    return (CrudRepository<T, ID>) repository;
  }
}
